package models

type ParamSignUp struct {
	Username   string `json:"username" binding:"required" example:"小明"` //用户名
	Email      string `json:"email" binding:"required,email" example:"8545412121@qq.com"`//邮箱
	Password   string `json:"password" binding:"required" example:"123456"` //密码
	RePassword string `json:"re_password" binding:"required,eqfield=Password" example:"123456"` //重复密码
}

type ParamLogin struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type ParamSaveArticle struct {
	Title   string `json:"title" binding:"required"`
	Content string `json:"content" binding:"required"`
	TypeId  int64  `json:"type_id" binding:"required"`
}

type ParamAddVote struct {
	ArticleId   string `json:"article_id" binding:"required"`
	Score int8 `json:"score" binding:"oneof=0 1 -1"`
}
